(ccl-decode-mule-utf-8): Lookup
authorKenichi Handa <handa@m17n.org>
Thu, 2 Oct 2003 00:49:04 +0000 (00:49 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 2 Oct 2003 00:49:04 +0000 (00:49 +0000)
utf-subst-table-for-decode even for U+E000..U+FFFF.

lisp/international/utf-8.el

index 85bdae7ac649c832ef2abb1b9be87a29aa4d0653..54f6633ce4206390c6baa8ae7fe11608a1a1c014 100644 (file)
@@ -448,12 +448,19 @@ default.  Also, installing them may be rather slow."
 
                            ;; mule-unicode-e000-ffff
                            ;; Fixme: fffe and ffff are invalid.
-                           ((r0 = ,(charset-id 'mule-unicode-e000-ffff))
-                            (r3 -= #xe000)
-                            (r3 //= 96)
-                            (r1 = (r7 + 32))
-                            (r1 += ((r3 + 32) << 7))
-                            (write-multibyte-character r0 r1)))))))))
+                           ((r4 = r3)  ; don't zap r3
+                            (lookup-integer utf-subst-table-for-decode r4 r5)
+                            (if r7
+                                ;; got a translation
+                                ((write-multibyte-character r4 r5)
+                                 ;; Zapped through register starvation.
+                                 (r5 = ,(charset-id 'eight-bit-control)))
+                              ((r0 = ,(charset-id 'mule-unicode-e000-ffff))
+                               (r3 -= #xe000)
+                               (r3 //= 96)
+                               (r1 = (r7 + 32))
+                               (r1 += ((r3 + 32) << 7))
+                               (write-multibyte-character r0 r1)))))))))))
 
              (if (r0 < #xfe)
                  ;; 4byte encoding